Xbasic

SQL::ConnectionGenerateRevokeAccessStatement Method

Syntax

SQL_Statement as C = GenerateRevokeAccessStatement as C (User as C, Resource as C, AccessType as C)

Arguments

UserCharacter

The user that will receive the new permission.

ResourceCharacter

A database table or view.

AccessTypeCharacter

The type of permission to set.

Returns

SQL_StatementCharacter

Returns the statement to revoke permissions for a user's access to a resource.

Description

Generate a SQL Revoke Access statement.

Discussion

The SQL::Connection::GenerateRevokeAccessStatement() method removes a permission to a resource in a database from a user.

Example

dim conn as SQL::Connection
conn.open("{A5API=Access,FileName='C:\Program Files\A5V8\MDBFiles\Alphasports.mdb',UserName='Admin'}")
? conn.GenerateRevokeAccessStatement("Tom", "Customer", "Read")
= "REVOKE Read ON Customer FROM Tom"

See Also